//
//  NSDate+descrip.h
//  togetherLBS
//
//  Created by Phyllis Hu on 13-10-9.
//  Copyright (c) 2013年 celi. All rights reserved.
//

#import <Foundation/Foundation.h>
typedef enum {

    setDayTypeLastDay = -1,   //得到上一天
    setDayTypeNextDay = 1     //得到后一天
}setDayType;
typedef enum {
    
    setWeekTypeLastWeek = -1,   //得到上一周
    setWeekTypeNextWeek = 1     //得到后一周
}setWeekType;

@interface NSDate (descrip)

- (BOOL)isTheSameDayWith:(NSDate *)otherDate;//是否为同一天
- (NSString *)descriptionSinceNow;
- (NSString *)descriptionSinceNowFocusOnDay;
- (NSString *)dayDescriptionSinceNow;
//一天的 00:00:00
- (NSTimeInterval)dayBeginTime;

/**
 *  比较两个时间的大小
 *
 *  @return dateOne>=dateTwo return YES ;dateOne < dateTwo return NO
 */
+ (BOOL)compareWithDateOne:(NSDate*)dateOne dateTwo:(NSDate*)dateTwo;


+ (NSDate *)setDayDate:(NSDate*)nowDate type:(setDayType)type;
+ (NSDate *)setWeekDate:(NSDate*)nowDate type:(setWeekType)type;
/**
 *  把时间转化成字符串
 */
- (NSString*)dateConversionString;

/**
 *  把时间转化成字符串(去掉秒)
 */
- (NSString*)dateConversionString_clearS;

/**
 *  把时间转化成字符串(只有小时、分钟)
 */
- (NSString*)dateConversionString_Hm;

/**
 *  把时间转化成字符串(只有月份、日期)
 */
- (NSString*)dateConversionString_Md;

/**
 *  把时间转化成字符串(只有月份、日期、时间)
 */
- (NSString*)dateConversionString_MdT;

/**
 *  把时间转化成字符串(只有年、月份、日期)
 */
- (NSString*)dateConversionString_yMd;




/**
 *  字符串传时间
 */
+ (NSDate *)stringConverDate:(NSString *)dataString;
@end
